home *** CD-ROM | disk | FTP | other *** search
- /* WWJrAbout.c
- * Handle about box for Writeswell Jr.
- * Copyright ©1993 Working Software, Inc. All Rights Reserved.
- * 1 Mar 93 Mike Crawford
- */
-
- #include "TBConstants.h"
- #include "TBGlobals.h"
- #include "WWJrAbout.h"
- #include "AboutVersion.h"
-
- void DoAboutMe( void )
- {
- DialogPtr dlg;
- short item;
- short curFile;
-
- dlg = GetNewDialog( kAboutMeID, (Ptr)NULL, (WindowPtr) -1 );
-
- if ( !dlg )
- return;
-
- curFile = CurResFile();
- UseResFile( gAppFileRefNum );
-
- /* 1.0.2 display the version number from the 'vers' resource -
- * Install a "user item" to draw it in a custom font
- */
-
- InstallAboutVersionProc( dlg, kAVersItem );
-
- do {
- ModalDialog( (ModalFilterUPP)NULL, &item );
- } while ( item != 1 );
-
- DestroyAboutVersionProc( dlg, kAVersItem );
-
- DisposDialog( dlg );
-
- UseResFile( curFile );
-
- return;
- }
-
- #ifdef NEVER
- pascal void AboutVersionProc( DialogPtr dlg, short item )
- {
- Handle h;
- short kind;
- Rect r;
- GrafPtr oldPort;
- VersRecHndl versH;
-
- /* Draw the version number by getting it from the vers
- * resource. Saves a lot of time when making a new master disk
- */
-
- versH = (VersRecHndl)GetResource( 'vers', rVersID );
-
- if ( !versH ){
- return;
- }
-
- GetPort( &oldPort );
- SetPort( dlg );
-
- GetDItem( dlg, item, &kind, &h, &r );
-
- MoveTo( r.left, r.bottom );
-
- HLock( versH );
-
- PenNormal();
- TextFont( applFont );
- TextSize( 10 );
- TextFace( 0 );
-
- DrawString( (*versH)->shortVersion );
-
- HUnlock( versH );
- ReleaseResource( versH );
-
- SetPort( oldPort );
-
- return;
- }
- #endif
-